meer sheikh
03/22/2025, 11:26 PMVapi Support Bot
03/22/2025, 11:28 PMjson
// Correct format example:
{
"result": "The following timeslots are available: 2025-01-31T14:00:00-05:00,2025-01-31T14:30:00-05:00"
}
According to the [information I found](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334658296291921920), you can validate your JSON using a tool like [jsonlint.com](https://jsonlint.com/) to identify any errors.
2. Content-Type Header Issues
Make sure the Content-Type
header of your webhook response is set to application/json
. This tells the system that the payload is in JSON format, as mentioned in [this troubleshooting guide](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330221332452999321).
3. Assistant Configuration
Review your assistant's configuration, specifically the clientMessages
field, to ensure it's set up to handle success messages correctly. Also check that your prompt includes clear instructions on how to handle unavailable timeslots.
4. Webhook Response Format
Ensure you're returning the correct response format for tool call responses. According to [Vapi's documentation](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343862805463302184), you can check the correct format at: https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context
5. Server Response to bookAppointmentVapi Support Bot
03/22/2025, 11:28 PM{ "result": "The appointment was booked successfully." }
- Failure: { "result": "The appointment time is unavailable, please try another time." }
The assistant will use this "result" to inform the user about availability.
6. Try a Different Model
Consider using the gpt-4o
model, as it may improve tool calling and address the issue, according to [user feedback](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465172263960637).
Is there a specific part of this process you'd like me to elaborate on further?
Sources:
- [Discord Thread on Webhook Response Format](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334658296291921920)
- [Discord Thread on Content-Type Header Issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1330221332452999321)
- [Discord Thread on Tool Call Response Format](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1343862805463302184)
- [Discord Thread on Model Recommendations](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465172263960637)
- [Documentation on Server Response Format](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Pen π»
03/23/2025, 6:39 AMmeer sheikh
03/23/2025, 9:01 AMPen π»
03/23/2025, 3:22 PMAniah
03/23/2025, 3:47 PMmeer sheikh
03/23/2025, 8:40 PMmeer sheikh
03/23/2025, 8:41 PMmeer sheikh
03/23/2025, 8:43 PMPen π»
03/24/2025, 8:37 AMmeer sheikh
03/24/2025, 9:39 AMVapi Support Bot
03/24/2025, 9:40 AMjson
{
"results": [
{
"toolCallId": "1.message.toolcallList",
"result": "It seems this time is unavailable, there is an open slot for 7. Result. Would you like to schedule that time?"
}
]
}
Have you tried the simpler format recommended in the [documentation](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)?
json
{
"result": "It seems this time is unavailable, there is an open slot for 7. Result. Would you like to schedule that time?"
}
This might help the assistant interpret the response more reliably.
Sources:
- [Discord Thread on Webhook Response Format](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1334658296291921920)
- [Documentation on Server Response Format](https://docs.vapi.ai/tools/custom-tools#server-response-format-providing-results-and-context)Vapi Support Bot
03/24/2025, 9:40 AM051d3c50-48ae-46e3-9b2d-7c4ff32376c0
.
A support specialist will review your case and get back to you soon. In the meantime, if you haven't already tried it, switching to the gpt-4o
model [might help with tool calling issues](https://discord.com/channels/1211482211119796234/1211483291191083018/threads/1337465172263960637) as mentioned in our documentation.
Thanks for your patience while we work to resolve this!meer sheikh
03/24/2025, 10:01 AMVapi Support Bot
03/24/2025, 10:02 AM051d3c50-48ae-46e3-9b2d-7c4ff32376c0
to determine exactly why the assistant is still booking unavailable slots despite receiving the correct webhook responses.
While you wait, one thing to consider is whether the assistant is correctly interpreting the specific wording in your webhook response. The message "It seems this time is unavailable, there is an open slot for 7. Result." might be confusing the model with its phrasing. You might try a more direct message format like: {"result": "The requested time is unavailable. Available alternatives: 7:00 PM."}
Our team will be in touch soon to help resolve this persistent issue. Thanks for your patience!Vapi Support Bot
03/24/2025, 10:03 AM051d3c50-48ae-46e3-9b2d-7c4ff32376c0
to identify why the assistant isn't properly handling the unavailability responses.
Looking at your prompt, it seems well-structured with the right instructions for handling unavailable slots. The fact that you're using GPT-4o and have tried the simplified response format suggests this might be a more complex interaction issue between your webhook response and how the assistant is processing it.
Hang tight - we'll have someone look into this as soon as possible and get back to you with a solution.meer sheikh
03/24/2025, 11:48 PMVapi Support Bot
03/24/2025, 11:49 PM051d3c50-48ae-46e3-9b2d-7c4ff32376c0
and will be prepared to help resolve this issue once and for all.
Thanks for your patience - we'll get this sorted out for you!meer sheikh
03/24/2025, 11:55 PMAniah
03/25/2025, 2:03 AMmeer sheikh
03/25/2025, 9:47 AMVapi Support Bot
03/25/2025, 9:48 AMAniah
03/27/2025, 5:32 AM